//
//  StringWithHeight.m
//  Icar
//
//  Created by dllo on 15/10/16.
//  Copyright © 2015年 小龙侠. All rights reserved.
//

#import "StringWithHeight.h"

@implementation StringWithHeight

+ (CGFloat)HeightWithText:(NSString *)text width:(CGFloat)width font:(UIFont *)font{
    
    CGSize size = CGSizeMake(width, 3000);
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return rect.size.height;
}

@end
